package com.ziyun.erp.modules.service.dto;

import com.ziyun.erp.common.e.service.ServiceReceiveStatusEnum;
import com.ziyun.erp.common.e.service.ServiceTypeEnum;
import com.ziyun.erp.common.utils.EnumUtil;

import java.math.BigDecimal;

/**
 * 确认退款信息DTO
 * @author zh
 * @date 2018/9/209:45
 */
public class ServiceRefundsConfirmDto {
    /**
     * 售后id
     */
    private Integer srSrId;

    /**
     * 退款id
     */
    private Integer srId;

    /**
     * 售后类型
     */
    private Integer srType;

    /**
     * 收货状态
     */
    private Integer srReceiveStatus;

    /**
     * 1原路退回 2 其它
     */
    private Integer srRefundPath;
    /**
     * 退款金额
     */
    private BigDecimal srRefundAmount;
    /**
     * 账户类型 1银行卡 2 支付宝
     */
    private Integer srAccountType;
    /**
     * 银行卡号
     */
    private String srBankCode;
    /**
     * 持卡人姓名
     */
    private String srBankCardholder;
    /**
     * 银行名称
     */
    private String srBankName;
    /**
     * 开户行
     */
    private String srBankOpen;
    /**
     * 支付宝账号
     */
    private String srAlipayCode;
    /**
     * 支付宝姓名
     */
    private String srAlipayName;

    public Integer getSrSrId() {
        return srSrId;
    }

    public void setSrSrId(Integer srSrId) {
        this.srSrId = srSrId;
    }

    public Integer getSrId() {
        return srId;
    }

    public void setSrId(Integer srId) {
        this.srId = srId;
    }

    public Integer getSrType() {
        return srType;
    }

    public String getSrTypeText() {
        if(srType != null){
            return EnumUtil.getEnumByCodeInt(ServiceTypeEnum.class, srType).toDescribe();
        }else
            return null;
    }

    public void setSrType(Integer srType) {
        this.srType = srType;
    }

    public Integer getSrReceiveStatus() {
        return srReceiveStatus;
    }

    public String getSrReceiveStatusText() {
        if (this.srReceiveStatus != null && this.srReceiveStatus != 0) {
            return EnumUtil.getEnumByCodeInt(ServiceReceiveStatusEnum.class, srReceiveStatus).toDescribe();
        } else
            return "--";
    }

    public void setSrReceiveStatus(Integer srReceiveStatus) {
        this.srReceiveStatus = srReceiveStatus;
    }

    public Integer getSrRefundPath() {
        return srRefundPath;
    }

    public String getSrRefundPathText() {
        return srRefundPath ==1? "原路退回": "其它";
    }



    public void setSrRefundPath(Integer srRefundPath) {
        this.srRefundPath = srRefundPath;
    }

    public BigDecimal getSrRefundAmount() {
        return srRefundAmount;
    }

    public void setSrRefundAmount(BigDecimal srRefundAmount) {
        this.srRefundAmount = srRefundAmount;
    }

    public Integer getSrAccountType() {
        return srAccountType;
    }

    public String getSrAccountTypeText() {
        String srAccountTypeText="";
        if(srAccountType !=null){
            if(srAccountType.intValue()==1){
                srAccountTypeText = "银行卡";
            }else {
                srAccountTypeText = "支付宝";
            }
        }
        return srAccountTypeText;
    }

    public void setSrAccountType(Integer srAccountType) {
        this.srAccountType = srAccountType;
    }

    public String getSrBankCode() {
        return srBankCode;
    }

    public void setSrBankCode(String srBankCode) {
        this.srBankCode = srBankCode;
    }

    public String getSrBankCardholder() {
        return srBankCardholder;
    }

    public void setSrBankCardholder(String srBankCardholder) {
        this.srBankCardholder = srBankCardholder;
    }

    public String getSrBankName() {
        return srBankName;
    }

    public void setSrBankName(String srBankName) {
        this.srBankName = srBankName;
    }

    public String getSrBankOpen() {
        return srBankOpen;
    }

    public void setSrBankOpen(String srBankOpen) {
        this.srBankOpen = srBankOpen;
    }

    public String getSrAlipayCode() {
        return srAlipayCode;
    }

    public void setSrAlipayCode(String srAlipayCode) {
        this.srAlipayCode = srAlipayCode;
    }

    public String getSrAlipayName() {
        return srAlipayName;
    }

    public void setSrAlipayName(String srAlipayName) {
        this.srAlipayName = srAlipayName;
    }
}
